import request from './index'

export const login = (data: {
    username: string
    password: string
}) => {
    return request({
        url: '/login',
        method: 'POST',
        data: data,
    })
}

export const goodsList = (data: any) => {
    return request({
        url: '/goods/list',
        method: 'GET',
        data: data,
    })
}

// 获取角色列表
export const getRoleList = () => {
    return request({
        url: '/getRoleList',
        method: 'GET',
    })
}

// 获取用户列表
export const getUserList = (data: {
    pageNum?: number
    pageSize?: number
    username?: string
    status?: number
}) => {
    return request({
        url: '/user/list',
        method: 'GET',
        data: data,
    })
}
